1. Field of the Invention
The present invention relates to an image processing apparatus that searches for an image including a specific object image, a method of controlling the same, and a storage medium, and more particularly to an image processing apparatus that searches for an image including a specific face.
2. Description of the Related Art
In general, there has been known a face detection technology for detecting a face area of an object image from an image in which an object is photographed, and moreover, a face identification technology for identifying a person from the detected face area has been put into practical use.
In a PC application using the face identification technology, a face area is detected from an image stored in a PC, and face identification is performed on the detected face area to thereby give a person name to the image. Then, the image is retrieved using the person name.
By the way, a so-called face dictionary is provided in a PC for execution of face identification. Note that the face dictionary is a dictionary in which feature values of persons (particularly e.g. those of faces) in images are associated with person names. For example, images having person feature values close to each are arranged into a group and are displayed on a monitor, and then a person name is added to the group, whereby a face dictionary is created in which the feature values of these images are associated with the person name.
For example, as disclosed in Japanese Patent Laid-Open Publication No. 2010-39724, as a method of retrieving an image including a specific face, there has been proposed one which compares a feature value of a face area detected from an image and a feature value of a specific face included in the face dictionary. In this method, when the detected face area corresponds to the specific face, a file number (file entry) of the image (i.e. an image file) including the detected face area is stored in the face dictionary.
By the way, to retrieve images including a specific face from a number of images and use them as candidate images, first, a feature value is determined with respect to each of all the images. Then, it is necessary to determine whether or not an image is a candidate image, according to a degree of similarity obtained by comparison performed on an image-by-image basis between the feature value of the image and each feature value registered in the face dictionary.
However, to determine whether or not an image is a candidate image by determining a degree of similarity with respect to each of all the images as described above increases not only processing load but also processing time.
On the other hand, according to Japanese Patent Laid-Open Publication No. 2010-39724, the file entries of image files each including a specific face are stored in the face dictionary, and hence image files whose file entries are stored can be retrieved at high speed by using the face dictionary.
However, if an image file (also referred to as an image) is newly added to an image processing apparatus, such as a PC, a file entry of the newly added image file is not stored in the face dictionary yet, and hence the image associated therewith is excluded from candidate images to be retrieved.
As a consequence, if candidate images are searched for again, the search processing has to be performed also with respect to image files which have existed in the image processing apparatus and have not been registered candidate images, which eventually takes increased time to complete the search processing.
Further, when the search for candidate images is performed again after the face dictionary has been updated, it is required to recalculate the above-mentioned feature value because the face dictionary has been updated, and hence the processing time also increases due to this recalculation.